package com.yex.service;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.yex.common.utils.PageUtils;
import com.yex.entity.UserEntity;
import com.yex.utils.JsonResultVo;

import java.util.List;
import java.util.Map;

/**
 * @author Little Liu
 * @version V1
 * @date Created in 2018/12/26 9:10
 * @description 描述
 */
public interface UserService extends IService<UserEntity> {

    PageUtils queryPage(Map<String, Object> params, String filter);

    PageUtils merchantPage(Map<String, Object> params);

    void merchantGranted(Long[] ids);

    UserEntity selectUserByMobile(String mobile);

    UserEntity selectUserByMobileOrUid(String mobile);

    List<UserEntity> selectUserByIdentityNumber(String identityNumber);

    JsonResultVo insertUser(String mobile, String area, Integer introUserid, String password, String ip);

    Integer updateUserPhoto(String path, Integer userId);

    JsonResultVo updateRealNameAuth(UserEntity userEntity);

    JsonResultVo updateUserByLogin(String mobile, String password, String ip);

    JsonResultVo updateForgetPassword(String mobile, String password);

    JsonResultVo updateMoneyPassword(UserEntity userEntity, String password);

    JsonResultVo updateModifyPassword(UserEntity userEntity, String password);

    Integer updatePassIdentity(Integer userId);

    Integer updateNoPassIdentity(Integer userId);

    /**
     * 更新用户直推伞下用户
     * 1获取所有用户
     * 2取出用户推荐人
     * 3 递归 统计 直推  伞下  用户
     * @return
     */
    Integer updateIntro();

    JsonResultVo userInfo(UserEntity userEntity);

    List<UserEntity> selectPageFilter(Page<UserEntity> page, String filter);

    List<UserEntity> selectIntroUserId(Integer introUserId);

    JsonResultVo selectIntroList(Integer userId);
}

